package controller.design_mode_03_proxy_dynamic;

import java.lang.reflect.InvocationHandler;

/**
 * ***********************************************************
 *
 * @类名 : controller.design_mode_02_proxy_static.类名
 * @DESCRIPTION : 场景类
 * @AUTHOR :  一个风情万种的男子
 * @DATE : 2016/4/15
 * ***********************************************************
 */
public class Client {

    public static void main(String[] args) {
        Subject conSubject = new ConSubject();
        InvocationHandler invocationHandler = new MyHandlder(conSubject);
        Subject proxy = DynamicProxy.newProxyInstance(conSubject.getClass().getClassLoader(), conSubject.getClass().getInterfaces(), invocationHandler);
        proxy.doSomeThing();

    }

}
